<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel='stylesheet' type='text/css' href='${initParam.root }/css/mentoring.css' />
<c:set value="${sessionScope.mvo }" var="mvo"></c:set>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
	$(function(){
		$(".noteView").click(function(){
			 location.href="${initParam.root}/mentoring/getNoteList.do?uid="+
			 	$(this).text();
		});
		$(".byeBtn").click(function(){
			if(confirm("멘토관계를 끊으시겠습니까? 확인을 누르시면 포인트가 차감되며 멘토관계가끊어집니다.")){
				location.href="${initParam.root}/mentoring/breakMentorRelationship.do?mentor.id="+
					$(this).parents("tr").children("td:first-child").text();
			}
		});
	});
</script>
</head>
<body>
<div id="mymentoring">
<div id="myMentor">
나의 멘토보기
<table cellpadding="3" width="100%" id="mentorTable" >
	<thead>
	<tr>
		<th>ID</th><th>LEVEL</th><th>NEW</th><th>BREAK UP</th>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${requestScope.mentoringMap.mentorList }" var="mentor">
		<tr >
			<td class="noteView">${mentor.id }</td>
			<td>${mentor.level }</td>
			<td></td>
			<td></td>
		</tr>
	</c:forEach>
	</tbody>
</table>
</div>
<div id="myMentee">
나의멘티보기
<table cellpadding="3" width="100%" id="menteeTable" >
	<thead>
	<tr>
		<th>ID</th><th>LEVEL</th><th>NEW</th><th>BREAK UP</th>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${requestScope.mentoringMap.menteeList }" var="mentee">
		<tr>
			<td class="noteView">${mentee.id}</td>
			<td>${mentee.level }</td>
			<td></td>
			<td><input type="button" value="멘토끊기" class="byeBtn"></td>
		</tr>
	</c:forEach>
	</tbody>

</table>
</div>
</div>
</body>
</html>